package com.admin.mapper;

import java.util.Date;
import java.util.List;

import javax.transaction.Transactional;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.admin.bean.MyUser;

/**
 * MyUser映射类 Created by Administrator on 2017/11/24.
 */
@Mapper
public interface MyUserMapper {
	@Select("SELECT * FROM www_user WHERE id = #{id}")
	MyUser findById(@Param("id") Long id);
	
	@Select("SELECT * FROM www_user")
	List<MyUser> list();

	
	@Insert("INSERT INTO www_user(id, name, address, phone, email, date) VALUES(#{id},#{name},#{address}, #{phone}, #{email}, #{date})")
	int insert(@Param("id") Long id, 
			@Param("name") String name, 
			@Param("address") String address,
			@Param("phone") String phone,
			@Param("email") String email,
			@Param("date") Date date);

}